package com.chenjj.java.jdk8.lambda;

public class InnerClassJava {
    public Runnable r = new Runnable() {
        @Override
        public void run() {
            //这里的this指的是匿名类，而非InnerClassJava类
            //想要引用InnerClassJava类需要InnerClassJava.this这样：
            //System.out.println(InnerClassJava.this);
            //System.out.println(InnerClassJava.this.toString());
            System.out.println(this);
            System.out.println(toString());
            System.out.println("");
        }
    };

    public String toString(){
        return "Hello's custom toString()";
    }
}
